<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

//管理平台
Route::group(['prefix' => 'admin','namespace' => 'Admin'], function () {
    Route::get('/','IndexController@index')->name('admin');
    Route::get('/dashboard','IndexController@index')->name('admin.dashboard');
    Route::get('/new','NewController@getNewData')->middleware('cors');
    Route::get('/new/json','NewController@getNewJsonData')->middleware('cors');
    Route::get('/pic','NewController@getPicData')->middleware('cors');
    Route::get('/test','NewController@test');


    Route::get('/beginBat','NewController@beginBat');


    Route::POST('/new/update','NewController@updateNew');
    Route::delete('/new/{new_id}','NewController@deleteNew');
    /**
     * -------------------------------------------------
     * 菜单管理
     * -------------------------------------------------
     */
    Route::get('/menu','CategoryController@index');
    Route::get('/menu/data','CategoryController@menuJosnData');
});

